<?php
$config = [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=;dbname=',
            'username' => '',
            'password' => '',
            'charset' => 'utf8mb4',
            'tablePrefix' => '',
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/views/mail',
            'useFileTransport' => true,
        ],
        'fs_local' => [
            'class' => \creocoder\flysystem\LocalFilesystem::class,
            'path' => '/',
        ],
        'sftp_local' => [
            'class' => \creocoder\flysystem\SftpFilesystem::class,
            'host' => 'localhost',
            'username' => '',
            'password' => '',
            'port' => 22,
        ],
        'gaode_web_service' => [
            'class' => \common\members\wodrow\components\gaode\WebService::class,
            'key' => "",
        ],
        'easy_wechat' => [
            'class' => \jianyan\easywechat\Wechat::class,
            'userOptions' => [],  // 用户身份类参数
            'sessionParam' => 'wechatUser', // 微信用户信息将存储在会话在这个密钥
            'returnUrlParam' => '_wechatReturnUrl', // returnUrl 存储在会话中
        ],
        'wechat_sdk' => [
            'class' => \callmez\wechat\sdk\Wechat::class,
            'appId' => '微信公众平台中的appid',
            'appSecret' => '微信公众平台中的secret',
            'token' => '微信服务器对接您的服务器验证token'
        ],
    ],
    'params' => [
        'adminEmail' => '1173957281@qq.com',
        /** ------ 微信配置 ------ **/

        // 微信配置 具体可参考EasyWechat
        'wechatConfig' => [
            'app_id' => 'wx3cf0f39249eb0exx',
            'secret' => 'f1c242f4f28f735d4687abb469072axx',
            'token'   => 'wyii2',
        ],
        // 微信支付配置 具体可参考EasyWechat
        'wechatPaymentConfig' => [],
        // 微信小程序配置 具体可参考EasyWechat
        'wechatMiniProgramConfig' => [],
        // 微信开放平台第三方平台配置 具体可参考EasyWechat
        'wechatOpenPlatformConfig' => [],
        // 微信企业微信配置 具体可参考EasyWechat
        'wechatWorkConfig' => [],
        // 微信企业微信开放平台 具体可参考EasyWechat
        'wechatOpenWorkConfig' => [],

        /** ------ 微信自定义接口配置------------------- **/

        'userApiPath' => '', // 自定义接口路径
        'userApiNamespace' => '', // 命名空间
        'userApiCachePrefixKey' => '', // 缓存前缀
    ],
];

if (YII_ENV != 'prod'){
    $config['components']['db'] = [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=;dbname=test_',
        'username' => 'test',
        'password' => '',
        'charset' => 'utf8mb4',
        'tablePrefix' => '',
    ];
}

return $config;